﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace Orid.Management.Statistics.Tools.Decomposition.UI
{
  

    public partial class FormTree : DockContent
    {
        public FormTree()
        {
            InitializeComponent();
        }
        private readonly int _maxLineCount = 200;

        public void ShowMessage(string msg)
        {
            
                      

            if (textBoxMessage.Lines.Length > _maxLineCount)
            {
                int c = 0;
                for (int i = 0; i < _maxLineCount / 2; i++)
                    c += textBoxMessage.Lines[i].Length + Environment.NewLine.Length;

                textBoxMessage.Text = textBoxMessage.Text.Substring(c);
            }

            textBoxMessage.AppendText(Environment.NewLine + msg);
        
        }
    }
}
